<?php
 session_start();
require_once("bdd.php");

if( isset($_GET['com']) && isset($_GET['id']) ) {


$connexion->exec("DELETE FROM commentaire WHERE idcommentaire=".$_GET['com']."");
			
					 $hostAccueil  = $_SERVER['HTTP_HOST'];
					 $url = '/pictogramme.php?id='.$_GET['id'];
					header("Location: http://$hostAccueil$url");
}
else {
	 $hostAccueil  = $_SERVER['HTTP_HOST'];
	header("Location: http://$hostAccueil");
}

?>